Optimal. Leaf size=142 \[ -\frac {2 a^{5/2} (c-d)^2 \tanh ^{-1}\left (\frac {\sqrt {a} \sqrt {d} \cos (e+f x)}{\sqrt {c+d} \sqrt {a+a \sin (e+f x)}}\right )}{d^{5/2} \sqrt {c+d} f}+\frac {2 a^3 (3 c-7 d) \cos (e+f x)}{3 d^2 f \sqrt {a+a \sin (e+f x)}}-\frac {2 a^2 \cos (e+f x) \sqrt {a+a \sin (e+f x)}}{3 d f} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.27, antiderivative size = 142, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 4, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.148, Rules used = {2842, 3060,
2852, 214} \begin {gather*} -\frac {2 a^{5/2} (c-d)^2 \tanh ^{-1}\left (\frac {\sqrt {a} \sqrt {d} \cos (e+f x)}{\sqrt {c+d} \sqrt {a \sin (e+f x)+a}}\right )}{d^{5/2} f \sqrt {c+d}}+\frac {2 a^3 (3 c-7 d) \cos (e+f x)}{3 d^2 f \sqrt {a \sin (e+f x)+a}}-\frac {2 a^2 \cos (e+f x) \sqrt {a \sin (e+f x)+a}}{3 d f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 214
Rule 2842
Rule 2852
Rule 3060
Rubi steps
\begin {align*} \int \frac {(a+a \sin (e+f x))^{5/2}}{c+d \sin (e+f x)} \, dx &=-\frac {2 a^2 \cos (e+f x) \sqrt {a+a \sin (e+f x)}}{3 d f}+\frac {2 \int \frac {\sqrt {a+a \sin (e+f x)} \left (\frac {1}{2} a^2 (c+3 d)-\frac {1}{2} a^2 (3 c-7 d) \sin (e+f x)\right )}{c+d \sin (e+f x)} \, dx}{3 d}\\ &=\frac {2 a^3 (3 c-7 d) \cos (e+f x)}{3 d^2 f \sqrt {a+a \sin (e+f x)}}-\frac {2 a^2 \cos (e+f x) \sqrt {a+a \sin (e+f x)}}{3 d f}+\frac {\left (a^2 (c-d)^2\right ) \int \frac {\sqrt {a+a \sin (e+f x)}}{c+d \sin (e+f x)} \, dx}{d^2}\\ &=\frac {2 a^3 (3 c-7 d) \cos (e+f x)}{3 d^2 f \sqrt {a+a \sin (e+f x)}}-\frac {2 a^2 \cos (e+f x) \sqrt {a+a \sin (e+f x)}}{3 d f}-\frac {\left (2 a^3 (c-d)^2\right ) \text {Subst}\left (\int \frac {1}{a c+a d-d x^2} \, dx,x,\frac {a \cos (e+f x)}{\sqrt {a+a \sin (e+f x)}}\right )}{d^2 f}\\ &=-\frac {2 a^{5/2} (c-d)^2 \tanh ^{-1}\left (\frac {\sqrt {a} \sqrt {d} \cos (e+f x)}{\sqrt {c+d} \sqrt {a+a \sin (e+f x)}}\right )}{d^{5/2} \sqrt {c+d} f}+\frac {2 a^3 (3 c-7 d) \cos (e+f x)}{3 d^2 f \sqrt {a+a \sin (e+f x)}}-\frac {2 a^2 \cos (e+f x) \sqrt {a+a \sin (e+f x)}}{3 d f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(330\) vs. \(2(142)=284\).
time = 2.51, size = 330, normalized size = 2.32 \begin {gather*} \frac {(a (1+\sin (e+f x)))^{5/2} \left (6 (2 c-5 d) \sqrt {d} \cos \left (\frac {1}{2} (e+f x)\right )-2 d^{3/2} \cos \left (\frac {3}{2} (e+f x)\right )-\frac {3 (c-d)^2 \left (e+f x-2 \log \left (\sec ^2\left (\frac {1}{4} (e+f x)\right )\right )+2 \log \left (-\sec ^2\left (\frac {1}{4} (e+f x)\right ) \left (c+d+\sqrt {d} \sqrt {c+d} \cos \left (\frac {1}{2} (e+f x)\right )-\sqrt {d} \sqrt {c+d} \sin \left (\frac {1}{2} (e+f x)\right )\right )\right )\right )}{\sqrt {c+d}}+\frac {3 (c-d)^2 \left (e+f x-2 \log \left (\sec ^2\left (\frac {1}{4} (e+f x)\right )\right )+2 \log \left ((c+d) \sec ^2\left (\frac {1}{4} (e+f x)\right )+\sqrt {d} \sqrt {c+d} \left (-1+2 \tan \left (\frac {1}{4} (e+f x)\right )+\tan ^2\left (\frac {1}{4} (e+f x)\right )\right )\right )\right )}{\sqrt {c+d}}+6 \sqrt {d} (-2 c+5 d) \sin \left (\frac {1}{2} (e+f x)\right )-2 d^{3/2} \sin \left (\frac {3}{2} (e+f x)\right )\right )}{6 d^{5/2} f \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )^5} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 4.45, size = 229, normalized size = 1.61
method | result | size |
default | \(-\frac {2 a \left (1+\sin \left (f x +e \right )\right ) \sqrt {-a \left (\sin \left (f x +e \right )-1\right )}\, \left (3 \arctanh \left (\frac {\sqrt {-a \left (\sin \left (f x +e \right )-1\right )}\, d}{\sqrt {a \left (c +d \right ) d}}\right ) a^{2} c^{2}-6 \arctanh \left (\frac {\sqrt {-a \left (\sin \left (f x +e \right )-1\right )}\, d}{\sqrt {a \left (c +d \right ) d}}\right ) a^{2} c d +3 \arctanh \left (\frac {\sqrt {-a \left (\sin \left (f x +e \right )-1\right )}\, d}{\sqrt {a \left (c +d \right ) d}}\right ) a^{2} d^{2}-\left (-a \left (\sin \left (f x +e \right )-1\right )\right )^{\frac {3}{2}} \sqrt {a \left (c +d \right ) d}\, d -3 \sqrt {-a \left (\sin \left (f x +e \right )-1\right )}\, \sqrt {a \left (c +d \right ) d}\, a c +9 \sqrt {-a \left (\sin \left (f x +e \right )-1\right )}\, \sqrt {a \left (c +d \right ) d}\, a d \right )}{3 d^{2} \sqrt {a \left (c +d \right ) d}\, \cos \left (f x +e \right ) \sqrt {a +a \sin \left (f x +e \right )}\, f}\) | \(229\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 288 vs.
\(2 (126) = 252\).
time = 0.46, size = 906, normalized size = 6.38 \begin {gather*} \left [\frac {3 \, {\left (a^{2} c^{2} - 2 \, a^{2} c d + a^{2} d^{2} + {\left (a^{2} c^{2} - 2 \, a^{2} c d + a^{2} d^{2}\right )} \cos \left (f x + e\right ) + {\left (a^{2} c^{2} - 2 \, a^{2} c d + a^{2} d^{2}\right )} \sin \left (f x + e\right )\right )} \sqrt {\frac {a}{c d + d^{2}}} \log \left (\frac {a d^{2} \cos \left (f x + e\right )^{3} - a c^{2} - 2 \, a c d - a d^{2} - {\left (6 \, a c d + 7 \, a d^{2}\right )} \cos \left (f x + e\right )^{2} + 4 \, {\left (c^{2} d + 4 \, c d^{2} + 3 \, d^{3} - {\left (c d^{2} + d^{3}\right )} \cos \left (f x + e\right )^{2} + {\left (c^{2} d + 3 \, c d^{2} + 2 \, d^{3}\right )} \cos \left (f x + e\right ) - {\left (c^{2} d + 4 \, c d^{2} + 3 \, d^{3} + {\left (c d^{2} + d^{3}\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )\right )} \sqrt {a \sin \left (f x + e\right ) + a} \sqrt {\frac {a}{c d + d^{2}}} - {\left (a c^{2} + 8 \, a c d + 9 \, a d^{2}\right )} \cos \left (f x + e\right ) + {\left (a d^{2} \cos \left (f x + e\right )^{2} - a c^{2} - 2 \, a c d - a d^{2} + 2 \, {\left (3 \, a c d + 4 \, a d^{2}\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{d^{2} \cos \left (f x + e\right )^{3} + {\left (2 \, c d + d^{2}\right )} \cos \left (f x + e\right )^{2} - c^{2} - 2 \, c d - d^{2} - {\left (c^{2} + d^{2}\right )} \cos \left (f x + e\right ) + {\left (d^{2} \cos \left (f x + e\right )^{2} - 2 \, c d \cos \left (f x + e\right ) - c^{2} - 2 \, c d - d^{2}\right )} \sin \left (f x + e\right )}\right ) - 4 \, {\left (a^{2} d \cos \left (f x + e\right )^{2} - 3 \, a^{2} c + 7 \, a^{2} d - {\left (3 \, a^{2} c - 8 \, a^{2} d\right )} \cos \left (f x + e\right ) + {\left (a^{2} d \cos \left (f x + e\right ) + 3 \, a^{2} c - 7 \, a^{2} d\right )} \sin \left (f x + e\right )\right )} \sqrt {a \sin \left (f x + e\right ) + a}}{6 \, {\left (d^{2} f \cos \left (f x + e\right ) + d^{2} f \sin \left (f x + e\right ) + d^{2} f\right )}}, -\frac {3 \, {\left (a^{2} c^{2} - 2 \, a^{2} c d + a^{2} d^{2} + {\left (a^{2} c^{2} - 2 \, a^{2} c d + a^{2} d^{2}\right )} \cos \left (f x + e\right ) + {\left (a^{2} c^{2} - 2 \, a^{2} c d + a^{2} d^{2}\right )} \sin \left (f x + e\right )\right )} \sqrt {-\frac {a}{c d + d^{2}}} \arctan \left (\frac {\sqrt {a \sin \left (f x + e\right ) + a} {\left (d \sin \left (f x + e\right ) - c - 2 \, d\right )} \sqrt {-\frac {a}{c d + d^{2}}}}{2 \, a \cos \left (f x + e\right )}\right ) + 2 \, {\left (a^{2} d \cos \left (f x + e\right )^{2} - 3 \, a^{2} c + 7 \, a^{2} d - {\left (3 \, a^{2} c - 8 \, a^{2} d\right )} \cos \left (f x + e\right ) + {\left (a^{2} d \cos \left (f x + e\right ) + 3 \, a^{2} c - 7 \, a^{2} d\right )} \sin \left (f x + e\right )\right )} \sqrt {a \sin \left (f x + e\right ) + a}}{3 \, {\left (d^{2} f \cos \left (f x + e\right ) + d^{2} f \sin \left (f x + e\right ) + d^{2} f\right )}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.57, size = 239, normalized size = 1.68 \begin {gather*} -\frac {\sqrt {2} \sqrt {a} {\left (\frac {3 \, \sqrt {2} {\left (a^{2} c^{2} \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) - 2 \, a^{2} c d \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) + a^{2} d^{2} \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )\right )} \arctan \left (\frac {\sqrt {2} d \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )}{\sqrt {-c d - d^{2}}}\right )}{\sqrt {-c d - d^{2}} d^{2}} + \frac {2 \, {\left (2 \, a^{2} d^{2} \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} + 3 \, a^{2} c d \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 9 \, a^{2} d^{2} \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )}}{d^{3}}\right )}}{3 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {{\left (a+a\,\sin \left (e+f\,x\right )\right )}^{5/2}}{c+d\,\sin \left (e+f\,x\right )} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________